local skel = fk.CreateSkill {
  name = "lb__lingsong",
}

Fk:loadTranslationTable {
  ["lb__lingsong"] = "铃颂",
  --[":lb__lingsong"] = "当你的体力值变化后，若你没有副将，你可以将“<b>死龙</b>”作为副将，然后你增加X点体力上限（X为你已损失的体力值）。",
  --9.7
  [":lb__lingsong"] = "当你的体力值变化后，你可以变更副将为“<b>死龙</b>”，然后你增加X点体力上限（X为你已损失的体力值）。",

  ["#lb__lingsong"] = "铃颂：你可以变更副将为“<b>死龙</b>”，然后你加 %arg 点体力上限",

  ["$lb__lingsong1"] = "破茧而生！",
  ["$lb__lingsong2"] = "拥抱新生吧，玻吕刻斯。",
}

skel:addEffect(fk.HpChanged, {
  can_trigger = function(self, event, target, player, data)
    return player:hasSkill(skel.name) and target == player and player.deputyGeneral ~= "lb__silong"
  end,
  on_cost = function(self, event, target, player, data)
    return player.room:askToSkillInvoke(player, { skill_name = skel.name, prompt = "#lb__lingsong:::" .. player:getLostHp() })
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    room:changeHero(player, "lb__silong", false, true, true, false)
    room:changeMaxHp(player, player:getLostHp())
  end,
})

return skel
